Crate rmp3[−][src]
Idiomatic no_std
bindings to minimp3 which don't allocate.
Features
float
: Changes the type ofSample
to a single-precision float, and thus decoders will output float PCM.- This is a non-additive feature and will change API. Do not do this in a library without notice (why?).
mp1-mp2
: Includes MP1 and MP2 decoding code.simd
(default): Enables handwritten SIMD optimizations on eligible targets.std
(default): Adds things that requirestd
, right now that's justDecoderOwned
for owned data on the heap.
Example
use rmp3::{Decoder, Frame}; let mp3 = std::fs::read("test.mp3")?; let mut decoder = Decoder::new(&mp3); while let Some(frame) = decoder.next() { if let Frame::Audio(audio) = frame { // process audio frame here! } }
See individual documentation on Decoder
and RawDecoder
for more examples.
Structs
Audio | Describes audio samples in a frame. |
Decoder | High-level streaming iterator for parsing or decoding MPEG Audio data. |
DecoderOwned | std Exactly the same as |
RawDecoder | Low-level stateless decoder for parsing or decoding MPEG Audio data. |
Enums
Frame | Describes a frame, which contains audio samples or other data. |
Constants
MAX_SAMPLES_PER_FRAME | Maximum amount of samples that can be yielded per frame. |
Type Definitions
Sample | Conditional type used to represent one PCM sample in output data. |